Optimal. Leaf size=132 \[ -\frac{2 b^2 e n^2 \text{PolyLog}\left (2,-\frac{g (d+e x)}{e f-d g}\right )}{g (e f-d g)}-\frac{2 b e n \log \left (\frac{e (f+g x)}{e f-d g}\right ) \left (a+b \log \left (c (d+e x)^n\right )\right )}{g (e f-d g)}+\frac{(d+e x) \left (a+b \log \left (c (d+e x)^n\right )\right )^2}{(f+g x) (e f-d g)} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0883066, antiderivative size = 132, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 4, integrand size = 24, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.167, Rules used = {2397, 2394, 2393, 2391} \[ -\frac{2 b^2 e n^2 \text{PolyLog}\left (2,-\frac{g (d+e x)}{e f-d g}\right )}{g (e f-d g)}-\frac{2 b e n \log \left (\frac{e (f+g x)}{e f-d g}\right ) \left (a+b \log \left (c (d+e x)^n\right )\right )}{g (e f-d g)}+\frac{(d+e x) \left (a+b \log \left (c (d+e x)^n\right )\right )^2}{(f+g x) (e f-d g)} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 2397
Rule 2394
Rule 2393
Rule 2391
Rubi steps
\begin{align*} \int \frac{\left (a+b \log \left (c (d+e x)^n\right )\right )^2}{(f+g x)^2} \, dx &=\frac{(d+e x) \left (a+b \log \left (c (d+e x)^n\right )\right )^2}{(e f-d g) (f+g x)}-\frac{(2 b e n) \int \frac{a+b \log \left (c (d+e x)^n\right )}{f+g x} \, dx}{e f-d g}\\ &=\frac{(d+e x) \left (a+b \log \left (c (d+e x)^n\right )\right )^2}{(e f-d g) (f+g x)}-\frac{2 b e n \left (a+b \log \left (c (d+e x)^n\right )\right ) \log \left (\frac{e (f+g x)}{e f-d g}\right )}{g (e f-d g)}+\frac{\left (2 b^2 e^2 n^2\right ) \int \frac{\log \left (\frac{e (f+g x)}{e f-d g}\right )}{d+e x} \, dx}{g (e f-d g)}\\ &=\frac{(d+e x) \left (a+b \log \left (c (d+e x)^n\right )\right )^2}{(e f-d g) (f+g x)}-\frac{2 b e n \left (a+b \log \left (c (d+e x)^n\right )\right ) \log \left (\frac{e (f+g x)}{e f-d g}\right )}{g (e f-d g)}+\frac{\left (2 b^2 e n^2\right ) \operatorname{Subst}\left (\int \frac{\log \left (1+\frac{g x}{e f-d g}\right )}{x} \, dx,x,d+e x\right )}{g (e f-d g)}\\ &=\frac{(d+e x) \left (a+b \log \left (c (d+e x)^n\right )\right )^2}{(e f-d g) (f+g x)}-\frac{2 b e n \left (a+b \log \left (c (d+e x)^n\right )\right ) \log \left (\frac{e (f+g x)}{e f-d g}\right )}{g (e f-d g)}-\frac{2 b^2 e n^2 \text{Li}_2\left (-\frac{g (d+e x)}{e f-d g}\right )}{g (e f-d g)}\\ \end{align*}
Mathematica [A] time = 0.0835671, size = 126, normalized size = 0.95 \[ \frac{2 b^2 e n^2 (f+g x) \text{PolyLog}\left (2,\frac{g (d+e x)}{d g-e f}\right )-\left (a+b \log \left (c (d+e x)^n\right )\right ) \left (a g (d+e x)+b g (d+e x) \log \left (c (d+e x)^n\right )-2 b e n (f+g x) \log \left (\frac{e (f+g x)}{e f-d g}\right )\right )}{g (f+g x) (d g-e f)} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [C] time = 0.77, size = 1092, normalized size = 8.3 \begin{align*} \text{result too large to display} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F] time = 0., size = 0, normalized size = 0. \begin{align*} 2 \, a b e n{\left (\frac{\log \left (e x + d\right )}{e f g - d g^{2}} - \frac{\log \left (g x + f\right )}{e f g - d g^{2}}\right )} - b^{2}{\left (\frac{\log \left ({\left (e x + d\right )}^{n}\right )^{2}}{g^{2} x + f g} - \int \frac{e g x \log \left (c\right )^{2} + d g \log \left (c\right )^{2} + 2 \,{\left (e f n + d g \log \left (c\right ) +{\left (e g n + e g \log \left (c\right )\right )} x\right )} \log \left ({\left (e x + d\right )}^{n}\right )}{e g^{3} x^{3} + d f^{2} g +{\left (2 \, e f g^{2} + d g^{3}\right )} x^{2} +{\left (e f^{2} g + 2 \, d f g^{2}\right )} x}\,{d x}\right )} - \frac{2 \, a b \log \left ({\left (e x + d\right )}^{n} c\right )}{g^{2} x + f g} - \frac{a^{2}}{g^{2} x + f g} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [F] time = 0., size = 0, normalized size = 0. \begin{align*}{\rm integral}\left (\frac{b^{2} \log \left ({\left (e x + d\right )}^{n} c\right )^{2} + 2 \, a b \log \left ({\left (e x + d\right )}^{n} c\right ) + a^{2}}{g^{2} x^{2} + 2 \, f g x + f^{2}}, x\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{\left (a + b \log{\left (c \left (d + e x\right )^{n} \right )}\right )^{2}}{\left (f + g x\right )^{2}}\, dx \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{{\left (b \log \left ({\left (e x + d\right )}^{n} c\right ) + a\right )}^{2}}{{\left (g x + f\right )}^{2}}\,{d x} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]